From: tsteven4 Date: Sat, 16 Feb 2019 19:05:43 +0000 (-0700) Subject: Parallel test (#303) X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~8^2~41 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b59fedffaf0df3480dd84ac84657af836f58ca5b;p=gpsbabel.git Parallel test (#303) * run vtesto jobs in parallel. with the configure flow and "make check-vtesto". This will be utilized on travis. * add missing gitignore for new valgrind logs. --- diff --git a/Makefile.in b/Makefile.in index a40268856..857244d00 100644 --- a/Makefile.in +++ b/Makefile.in @@ -129,19 +129,23 @@ OBJS = main.o globals.o $(LIBOBJS) @FILEINFO@ DEPFILES = $(OBJS:.o=.d) +TESTCASES := $(sort $(wildcard $(srcdir)/testo.d/*.test)) +VGLOGS := $(addprefix $(builddir)/testo.d/, $(addsuffix .vglog, $(basename $(notdir $(TESTCASES))))) + .cc.o: $(CXX) @CPPFLAGS@ @CXXFLAGS@ -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@ .c.o: $(CC) @CPPFLAGS@ @CFLAGS@ -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@ - +%.vglog: FORCE + @$(srcdir)/vtesto -l -j $@ $(basename $(notdir $@)) # Directory of local web doc. Traditionally a sibling to the GPSBabel tree. WEB=@DOCDIR@ # Declaring a target PHONY whose names matches a subdirectory can be # particularly important, e.g. gui. -.PHONY: all clean tag more-clean check torture \ +.PHONY: all clean tag more-clean check check-vtesto torture \ install install-debug \ dep doc \ release-sourcecheck release-tarball release-rpm \ @@ -175,7 +179,7 @@ fileinfo.o: win32/gpsbabel.rc $(RC) -o fileinfo.o win32/gpsbabel.rc clean: - rm -f $(OBJS) gpsbabel gpsbabel.exe + rm -f $(OBJS) gpsbabel gpsbabel.exe $(VGLOGS) if [ -f gui/Makefile ]; then $(MAKE) -C gui clean; fi $(srcdir)/test-all -W @@ -194,6 +198,9 @@ more-clean: clean check: gpsbabel$(EXEEXT) $(srcdir)/testo +check-vtesto: gpsbabel$(EXEEXT) + $(MAKE) $(VGLOGS) + torture: gpsbabel$(EXEEXT) @echo "testo in progress... (basic data integrity test)" @$(srcdir)/testo diff --git a/build_and_test b/build_and_test index 719d307e5..b2fe52478 100755 --- a/build_and_test +++ b/build_and_test @@ -39,8 +39,7 @@ make check ./test_encoding_latin1 ./test_encoding_utf8 #make torture -rm -f vg.log -./vtesto -l -j vg.log +make -k -j2 check-vtesto # eat the verbose output from test-all, including crash.output # this is a bit risky, if test-all generates an error we won't see what happened. echo "test-all in progress... (read/write test between all possible formats)" diff --git a/configure b/configure index d857f9dd4..e9d869320 100755 --- a/configure +++ b/configure @@ -6778,6 +6778,7 @@ as_dir=jeeps; as_fn_mkdir_p as_dir=shapelib; as_fn_mkdir_p as_dir=src/core; as_fn_mkdir_p as_dir=zlib/contrib/minizip; as_fn_mkdir_p +as_dir=testo.d; as_fn_mkdir_p ac_config_files="$ac_config_files Makefile gbversion.h gui/setup.iss xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc" diff --git a/configure.ac b/configure.ac index 4e0d38716..3daf07cee 100644 --- a/configure.ac +++ b/configure.ac @@ -442,6 +442,7 @@ AS_MKDIR_P([jeeps]) AS_MKDIR_P([shapelib]) AS_MKDIR_P([src/core]) AS_MKDIR_P([zlib/contrib/minizip]) +AS_MKDIR_P([testo.d]) AC_CONFIG_FILES([Makefile gbversion.h gui/setup.iss xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc]) AC_CONFIG_FILES([gui/makelinuxdist.sh], [chmod +x gui/makelinuxdist.sh]) diff --git a/testo.d/.gitignore b/testo.d/.gitignore new file mode 100644 index 000000000..72d4efa29 --- /dev/null +++ b/testo.d/.gitignore @@ -0,0 +1 @@ +/*.vglog diff --git a/testo.d/kml.test b/testo.d/kml.test index 55b3c7434..5a1d2fcfc 100644 --- a/testo.d/kml.test +++ b/testo.d/kml.test @@ -65,23 +65,25 @@ compare ${REFERENCE}/track/tracks~gpx.kml ${TMPDIR}/tracks~gpx.kml gpsbabel -i kml -f ${REFERENCE}/track/Placemark-Track-1.kml -o gpx -F ${TMPDIR}/Placemark-Track-1~kml.gpx compare ${REFERENCE}/track/Placemark-Track-1~kml.gpx ${TMPDIR}/Placemark-Track-1~kml.gpx -set -e -if which xmllint > /dev/null; -then - KMLS=$(find ${REFERENCE} -name \*.kml) - for f in $KMLS - do - case $f in - # Argue with the KML wizards about this. It was the intent for that - # to be legal in Earth GX 2.2. - ${REFERENCE}/track/segmented_tracks-track.kml) continue;; - *) - tmpf=${TMPDIR}/$(basename $f) - gpsbabel -i kml -f $f -o kml -F $tmpf - xmllint --schema ${BASEPATH}/tools/kml22-schema/kml22gx.xsd --noout $tmpf - esac; - done -else - echo "Skipping KML validation phase." +if [ "${RUNNINGVALGRIND}" != "0" ]; then + set -e + if which xmllint > /dev/null; + then + KMLS=$(find ${REFERENCE} -name \*.kml) + for f in $KMLS + do + case $f in + # Argue with the KML wizards about this. It was the intent for that + # to be legal in Earth GX 2.2. + ${REFERENCE}/track/segmented_tracks-track.kml) continue;; + *) + tmpf=${TMPDIR}/$(basename $f) + gpsbabel -i kml -f $f -o kml -F $tmpf + xmllint --schema ${BASEPATH}/tools/kml22-schema/kml22gx.xsd --noout $tmpf + esac; + done + else + echo "Skipping KML validation phase." + fi + set +e fi -set +e diff --git a/vtesto b/vtesto index b8b251c2c..6037546f8 100755 --- a/vtesto +++ b/vtesto @@ -11,7 +11,7 @@ BASEPATH=`dirname $0` while getopts "lj:" opt; do case $opt in - l) OPTS="--leak-check=full --show-reachable=yes --num-callers=24 --suppressions=gpsbabel.supp" ; QUIET="";; + l) OPTS="--leak-check=full --show-reachable=yes --num-callers=24 --suppressions=${BASEPATH}/gpsbabel.supp" ; QUIET="";; j) LOG=$OPTARG;; esac done